package net.zjitc.service;

import net.zjitc.dao.UserDao;
import net.zjitc.domain.User;

import java.sql.SQLException;

/**
 * Created by Administrator on 2017/9/27.
 */
public class UserService {
    public int login(User user){
        UserDao dao = new UserDao();
        int x = 1;//记录登陆状态
        try {
            x = dao.login(user);//连接数据库校验账号密码
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return x;
    }
}
